<template>
  <div>
    <h1>第六题</h1>
    <h3>我活了{{ nub }}天</h3>
    <button @click="btn">点击</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      nub: "",
    };
  },
  methods: {
    btn() {
      let strTime = new Date("1994-3-1").getTime();
      let newTime = new Date().getTime();
      this.nub = (newTime - strTime) / (1000 * 60 * 60 * 24);
      //console.log(newTime - strTime);
      //console.log(this.nub);
    },
  },
};
</script>

<style>
</style>
